package com.lagou.xsq_springboot_rpc_provider.start;

import com.lagou.xsq_springboot_rpc_provider.rpc.RpcServer;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * @ClassName ApplicationRunnerTest
 * @Description TODO
 * @Author xsq
 * @Date 2020/5/30 16:40
 **/
@Component
public class ApplicationRunnerTest implements ApplicationRunner {
    /**
     * 在springboot 启动的时候进行初始化
     *
     * @param args
     * @throws Exception
     */
    @Override
    public void run(ApplicationArguments args) throws Exception {
        System.out.println("远程调用服务端启动");
        RpcServer.startServer("localhost", 8085);
    }
}
